$dir = "/data1/bsi/BORA_processing/devel/compressed/data_HGUPLUS2/GSE7307";
@names =`ls $dir`;
$maindir = "/data1/bsi/BORA_processing/devel/compressed/data_HGUPLUS2";
#print @names."\n";
$num = 0;
$main = 1;
system("rm $maindir/temp/*");
for($i=0;$i<@names;$i++)
{
	chomp($names[$i]);
	if($num == 50)
	{
		system("/usr/bin/perl /data1/bsi/BORA_processing/devel/data_HTHGU/NormSumSrc/HGUPLUS2_GeneSumm_batch_V1/bin/batch_normalized_frma_convertedCEL2.pl -i $maindir/temp -o $maindir/temp_results -d /data1/bsi/BORA_processing/temp");
		$num = 0;
		system("rm $maindir/temp/*");
		system("cat $maindir/temp_results/sample.qc >> $maindir/sample.qc");
		system("rm $maindir/temp_results/*");
		#die;
		$main++;
	}
	system("cp $dir/$names[$i] $maindir/temp");
	
	$num++;
	#print "$dir/$names[$i]\n";	
}
system("/usr/bin/perl /data1/bsi/BORA_processing/devel/data_HTHGU/NormSumSrc/HGUPLUS2_GeneSumm_batch_V1/bin/batch_normalized_frma_convertedCEL2.pl -i $maindir/temp -o $maindir/temp_results -d /data1/bsi/BORA_processing/temp");
system("rm $dir/temp/*");
